package com.guicelcc.guicedemo;

import javax.inject.Inject;
import com.google.inject.Provider;

import com.guicelcc.guicedemo.annotation.Output;

public class StringWritingApplet implements MyApplet {
	
	private Provider<String> provider;
	private MyDestination destination;
	
	@Inject
	public StringWritingApplet(MyDestination destination,@Output Provider<String>  provider) {
		super();
		this.destination = destination ;
		this.provider = provider ;
	}
	
	public void writeString() {
		destination.write(provider.get());
	}
	

	@Override
	public void run() {
		writeString();
	}

}
